package com.qudian.pay.mq;

import com.alibaba.rocketmq.client.producer.SendResult;
import com.alibaba.rocketmq.client.producer.SendStatus;
import com.alibaba.rocketmq.common.message.Message;

/**
 * @Description: 发送消息结果,继承SendResult,便于以后扩展
 * @author gaoxiang
 * @date 2016年5月23日 下午1:20:14
 */ 
public class DefaultSendResult extends SendResult {
	
	private Message mqMsg;
	
	public boolean isSuccess() {
		return SendStatus.SEND_OK.equals(this.getSendStatus());
	}
	
	public Message getMqMsg() {
		return mqMsg;
	}
	
	public void setMqMsg(Message mqMsg) {
		this.mqMsg = mqMsg;
	}
	
	@Override
	public String toString() {
		return mqMsg.toString();
	}
}
